home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DClap / DIconLib.cpp < prev    next >
Text File  |  1996-07-05  |  15KB  |  645 lines

  1. // DIconLib.cp
  2.  
  3.  
  4.  
  5. #include "Dvibrant.h"
  6. #include "DIconLib.h"
  7. #include "DApplication.h"
  8. #include "DList.h"
  9. #include "DFile.h"
  10. #include <stdio.h>
  11.  
  12. typedef    unsigned char    byte;
  13. enum  BitFormat            { macbits, msbits, xbits };
  14. enum  BitmapFormat     { unknown, xbitmapfile, maciconrezfile};
  15.  
  16. DIconList* gIconList = NULL;
  17.  
  18. class DIconGlobals {
  19. public:
  20.    DIconGlobals() { gIconList = new DIconList(); }
  21. };
  22.  
  23. static DIconGlobals    globals; // initializes globals here
  24.  
  25. // Unix CC and gcc have problems linking DIcon.o w/ only data
  26. // change this to DIcons.h ??
  27. #ifdef OS_UNIX
  28. #ifdef OS_UNIX_IRIX
  29. #include "DIcons.c++"
  30. #else
  31. #include "DIcons.cc"
  32. #endif
  33. #endif
  34.  
  35. #ifdef OS_UNIX_OSF1
  36. #define StrPosInt unsigned int
  37. #else
  38. #define StrPosInt Nlm_Uint4
  39. #endif
  40.  
  41.  
  42. #if 0
  43. static unsigned short testicons[] = {
  44.     22213, 0, 13, 13, 12,
  45.  0xff00, 0x8180, 0x81c0, 0x9040, 0xa840, 0xa840, 0x9240, 0x8240,
  46.  0x8240, 0x8240, 0x8040, 0xffc0 
  47. ,
  48.   1215, 0, 32, 32, 64,
  49.  0x1fff, 0xfc00, 0x1000,  0x600, 0x13a0,  0x500, 0x13a0,  0x480,
  50.  0x13a8, 0x2440, 0x13a0,  0x420, 0x13a0, 0xe7f0, 0x13a1, 0x1010,
  51.  0x13a2,  0x810, 0x13a2,  0x810, 0x13aa,  0x890, 0x13a1, 0x1010,
  52.  0x13e0, 0xe010, 0x1220,   0x10, 0x1220,   0x10, 0x1220,   0x10,
  53.  0x122b, 0xfe90, 0x1222,  0x210, 0x11c2,  0x210, 0x1322, 0x1fd0,
  54.  0x1322, 0x1050, 0x1212, 0x1050, 0x121b, 0xf250, 0x1210, 0x1050,
  55.  0x1230, 0x1050, 0x1120, 0x1fd0, 0x11a0,   0x10, 0x10e0,   0x10,
  56.  0x1230, 0x2090, 0x1000,   0x10, 0x1000,   0x10, 0x1fff, 0xfff0
  57. ,
  58.   0,0,0,0,0,0 
  59. };
  60. #endif
  61.  
  62. static Boolean gByteFlipMade = false;
  63.  
  64. #ifdef NOTNOW_WIN_MOTIF
  65.  
  66. static byte    XByteFlip [256];
  67.  
  68. void MakeXByteFlip()
  69. {
  70.     short i, j;
  71.   byte val, inv;
  72.  
  73.   for (i = 0; i < 256; i++) {
  74.     inv = 0;
  75.     val = (byte) i;
  76.     for (j = 0; j < 8; j++) {
  77.       inv = (inv << 1);
  78.       inv += (val % 2);
  79.       val = (val >> 1);
  80.     }
  81.     XByteFlip[i] = inv;
  82.   }
  83.   gByteFlipMade= true;
  84. }
  85.  
  86. #else
  87.  
  88. void  MakeXByteFlip()
  89. {
  90.   gByteFlipMade= true;
  91. }
  92. #endif
  93.  
  94.  
  95. void DIconList::WriteAsCode( char* filename) 
  96. {
  97.     if (!filename) 
  98.         filename= (char*) gFileManager->GetOutputFileName("icons.c");
  99.     if (filename) {
  100.         long i, n= this->GetSize();
  101.         char *sbreak= ",\n";
  102.         DFile  iconf( filename, "w", "TEXT", "MMCC");
  103.         iconf.Open();
  104.         char buf[128];
  105.         sprintf(buf, "static unsigned short iconlist[] = { /* %d icons */ {\n", n);
  106.         iconf.WriteLine(buf);
  107.         for (i=0; i<n; i++) {
  108.             DIcon* ic= (DIcon*)IconAt(i);
  109.             ic->WriteCode( &iconf);
  110.             if (i == n-1) sbreak= ",\n 0, 0, 0, 0, 0, 0\n};\n";
  111.             iconf.WriteLine( sbreak );
  112.             }
  113.         iconf.Close();
  114.         }
  115. }
  116.  
  117. void DIcon::WriteCode( DFile* iconf)
  118. {
  119.     short i, nwords= 1 + ((fBitmapSize-1) / sizeof(short) );
  120.     char buf[512];
  121.     
  122.     sprintf( buf, " %d, %d, %d, %d, %d,\n", 
  123.                         fId, fSmall, fWidth, fHeight, nwords );
  124.     iconf->WriteLine( buf);
  125.     unsigned short *w = (unsigned short*) fBitmap;
  126.     char comma= ',';
  127.     for (i=0; i<nwords; i++) {
  128.         Boolean last= (i == nwords-1);
  129.         Boolean newline= (i % 8 == 7) || last;
  130.         if (last) comma= ' ';
  131.         sprintf( buf, " %#6x%c", *w, comma);
  132.         iconf->WriteLine( buf, newline);
  133.         w++;
  134.         }
  135.      
  136. }
  137.  
  138.  
  139. //class DIcon : public DObject
  140.  
  141. DIcon::DIcon() :
  142.     DObject(),
  143.     fId(0), fWidth(0), fHeight(0), fSmall(false),
  144.     fBitmapSize(0), fBitmap(NULL)
  145. }
  146.     
  147. DIcon::DIcon( long id, short width, short height, const char* bitmap, long bitmapsize) : 
  148.     DObject(),
  149.     fId(id), fWidth(width), fHeight(height),fSmall(false),
  150.     fBitmapSize(bitmapsize), fBitmap(NULL)
  151. {
  152.     Install( width, height, bitmap, bitmapsize);
  153. }
  154.  
  155. DIcon::DIcon( IconStore* store) :
  156.     DObject(), fBitmapSize(0), fBitmap(NULL)
  157. {
  158.     Install( -(store->width), store->height, (char*) &(store->bitmap), 
  159.                      store->bitmapsize * sizeof(short));
  160.     fId= store->id;
  161.     fSmall= store->smalli;
  162.     if (gIconList) gIconList->InsertLast( this);
  163. }
  164.  
  165.     
  166. DIcon::~DIcon() 
  167.     fBitmap= (char*)Nlm_MemFree(fBitmap); 
  168. }
  169.  
  170.  
  171. void DIcon::Draw(Nlm_RecT area)
  172. {
  173.     area.right  = Min( area.right, area.left + fWidth);
  174.     area.bottom = Min( area.bottom, area.top + fHeight);
  175.     Nlm_CopyBits( &area, fBitmap);
  176. }
  177.         
  178. void DIcon::Install( short width, short height, const char* bitmap, long bitmapsize) 
  179. {
  180.   Boolean flipbyte= (width<0);
  181.   if (flipbyte) width = -width;
  182.  
  183.     fWidth = width;
  184.     fHeight= height;
  185.     if (fBitmap) fBitmap= (char*)Nlm_MemFree(fBitmap);
  186.     fBitmapSize= 0;
  187.  
  188.     if (bitmap) {        
  189.         fBitmapSize = bitmapsize;
  190.         if ((fBitmap = (char*) Nlm_MemGet(fBitmapSize+2, FALSE)) != NULL) {
  191.  
  192. #ifdef IS_LITTLE_ENDIAN
  193. // damn, really I should just revise the compiled data form to use bytes instead of words
  194. // this is just a word little/big endian problem....
  195. //#if defined(WIN_MOTIF) || defined(WIN_MSWIN)
  196.        if (flipbyte) {
  197.          byte *storebyte, *bp, *bpend;
  198.          //if (!gByteFlipMade) MakeXByteFlip();  
  199.          storebyte= (byte*) fBitmap;
  200.          bp = (byte*) bitmap;
  201.          bpend= bp + bitmapsize;
  202.          while (bp < bpend) { 
  203.                  *storebyte++= bp[1];
  204.                  *storebyte++= bp[0];
  205.                  bp += 2;
  206.                     }
  207.          }
  208.        else
  209. #endif
  210.                 Nlm_MemCpy (fBitmap, bitmap, fBitmapSize); // +1 bad for mswin?
  211.                 fBitmap[fBitmapSize]= 0;
  212.             }
  213.         }
  214.  
  215.  
  216.  
  217.  
  218. //class DIconList : public DList
  219.  
  220. DIconList::DIconList()
  221. {
  222. }
  223.  
  224.  
  225. DIcon* DIconList::IconById(long id) 
  226. {
  227.     if (id) {
  228.         long i, n= this->GetSize();
  229.         for (i= 0; i<n; i++) {
  230.             if (IconAt(i)->fId == id) return IconAt(i);
  231.             }
  232.     }
  233.     return NULL;
  234. }
  235.  
  236. void DIconList::StoreFromCode( unsigned short* ilist, short nlist) 
  237. {
  238.     Boolean notdone;
  239.     IconStore* store;
  240.     unsigned short* next;
  241.     short i= 0;
  242.     
  243.     store= (IconStore*) ilist;    
  244.     notdone= (store->bitmapsize) && (nlist==0 || (i<nlist));
  245.     while (notdone) {
  246.         next= ilist + sizeof(IconStore) + (store->bitmapsize - 1) * sizeof(short);
  247.         DIcon* ic= new DIcon( store);
  248.         this->InsertLast( ic);
  249.         i++;
  250.         ilist= next;
  251.         store= (IconStore*) ilist;
  252.         notdone= (store->bitmapsize) && (nlist==0 || (i<nlist));
  253.         }
  254. }
  255.  
  256.  
  257. void DIconList::ReadAppIcons() 
  258. {
  259. #ifdef OS_DOS
  260.   char *suffix = ".icn"; // ?? or ".ico", which is also MSWin own format
  261. #else
  262.   char *suffix = ".icons";
  263. #endif
  264.     char *iconfile = NULL;
  265.  
  266.   //MakeXByteFlip();
  267.     long len= StrLen(  (char*)gApplication->Shortname()) + StrLen(suffix);
  268.     iconfile= (char*) MemNew(len+2);
  269.     StrCpy(iconfile, (char*)gApplication->Shortname());
  270.     StrCat(iconfile, suffix);
  271.     this->Read(iconfile);
  272.     Nlm_MemFree(iconfile);
  273. }
  274.     
  275.     
  276.  
  277.  
  278. Boolean DIconList::Read(char* filename) 
  279. {
  280.     BitmapFormat    fileformat= unknown;
  281.     FILE *f= FileOpen( filename, "r");
  282.     if (f) {
  283.         char line[512];
  284.         Boolean more= true;
  285.         short    atline = 0;
  286.         while (more && FileGets( line, 512, f)) {
  287.             StrPosInt index = 0;
  288.             atline++;
  289.  
  290.             if (Nlm_StrngPos(line, "char ", 0, true, &index)  
  291.             || Nlm_StrngPos(line, "static ", 0, true, &index)) {
  292.                 fileformat= xbitmapfile;    
  293.                 more= false;
  294.                 }
  295.                 
  296.             else if (Nlm_StrngPos(line, "resource ", 0, true, &index))  {
  297.                 fileformat= maciconrezfile;    
  298.                 more= false;
  299.                 }
  300.             
  301.             if (atline > 50) more= false;        
  302.             }
  303.         }
  304.     FileClose( f);
  305.     
  306.     switch (fileformat) {
  307.         case xbitmapfile        : return this->ReadXbitmapFormat( filename);
  308.         case maciconrezfile    : return this->ReadMacRezFormat( filename);
  309.         default                            : return false;
  310.         }
  311.         
  312. }
  313.  
  314.  
  315.  
  316. Boolean DIconList::ReadMacRezFormat(char* filename) 
  317. {
  318. /******
  319. mac rez file format:
  320. resource 'ICN#' (128, "Calc Family", purgeable) {
  321. {    $"..."
  322.     $"...",
  323.     // icon mask 
  324.     $"..."
  325.     $"..."
  326.   }
  327. };
  328.  
  329. resource 'ics#' (128, "Calc Family", purgeable) {
  330. };
  331.  
  332. resource 'ICON' (kSeedIconId, purgeable) {
  333.     $"0001 0000 0002 8000 0004 4000 0008 2000 0010 1000 0020 0800 0040 0400 0080 0200"
  334.     $"0100 0100 0200 0080 0400 0040 0800 0020 1000 0010 2000 0008 4000 3F04 8000 4082"
  335.     $"4000 8041 2001 3022 1001 C814 080E 7F8F 0402 3007 0201 0007 0100 8007 0080 6007"
  336.     $"0040 1FE7 0020 021F 0010 0407 0008 0800 0004 1000 0002 2000 0001 4000 0000 8000"
  337. };
  338. ******/
  339.  
  340.     const    short    bufsize = 512;
  341.     char  line[512];
  342.     byte    buf[bufsize];
  343.     byte *bitsp= NULL, *bitmap = NULL;
  344.     Boolean inbits= false, instring= false;
  345.     short    width = 0, height = 0;
  346.     long     id = 0;
  347.     char* linep= line;
  348.     long     bytesize= 0;
  349.     long     atsize= 0;
  350.     Boolean gotdata= false;
  351.     StrPosInt index;
  352.  
  353.     FILE *f= FileOpen( filename, "r");
  354.     if (f) 
  355.      while (FileGets( line, 512, f)) {
  356.         // assume may be multiple bitmaps / file
  357.         linep= line;
  358.         
  359.         if (inbits) {
  360.     suckbits:            
  361.     
  362.                 // here we must watch for 
  363.                 //    "$" == flag for hex data following
  364.                 //    '"' == start/end of string data
  365.                 //    ',' == end of one icon, another follows ?? we only get 1st & ingore mask?
  366.                 //    '}' ';' == end of resource
  367.                 
  368.             char ec, *ep;
  369.             char *cp= linep;
  370.             unsigned short card;
  371.             short rslt;
  372.             
  373.             if (!atsize || !bitsp) {
  374.                 bitsp= buf;
  375.                 atsize= 0;
  376.                 }
  377.                 
  378.             while (*cp) {
  379.             
  380.                 if (instring) {
  381.                     short ic;
  382.                     while (*cp && !isalnum(*cp)) cp++;
  383.                     for (ic= 0, ep= cp; 
  384.                         ic<2 && (*ep) && isalnum(*ep); 
  385.                         ep++, ic++) ;
  386.                     ec= *ep; *ep= 0; card= 0;
  387.                     rslt= sscanf( cp, "%hx", &card);
  388.                     *ep= ec;
  389.                     if ( atsize<bufsize && rslt>0 ) { 
  390.                         *bitsp++ = (byte) card;
  391.                         atsize++;
  392.                         }
  393.                     cp = ep;
  394.                     }    
  395.                 else
  396.                     cp++;
  397.                     
  398.                 if (*cp == '"') instring= !instring;
  399.                 else if (*cp == '}' || *cp == ';') inbits= instring = false;
  400.                 else if (*cp == ',') { 
  401.                         // skip rest of data in this rez.. ??
  402.                     while (*cp && !(*cp == '}' || *cp == ';')) cp++; 
  403.                     inbits= instring= false;
  404.                     } 
  405.                 
  406.                 if (atsize >= bufsize || !inbits) {
  407.                     //move buf[] data to bitmap store...
  408.                     long offset= bytesize;
  409.                     bytesize += atsize;
  410.                     if (!bitmap) 
  411.                         bitmap= (byte*) Nlm_MemGet( bytesize, false);
  412.                     else 
  413.                         bitmap= (byte*) Nlm_MemMore( bitmap, bytesize);
  414.                     Nlm_MemCopy( bitmap+offset, buf, atsize);
  415.                     bitsp= buf;
  416.                     atsize= 0;
  417.                     }
  418.                     
  419.                 if (!inbits) {                    
  420.                         // guess at width/height
  421. #if 1
  422.                     width= height= short( sqrt(bytesize * 8));
  423. #else            
  424.                         // ?? do a simple int square root -- bad for non-base-2 values
  425.                     long w= bytesize * 8;
  426.                     long h= 1;
  427.                     while (w>h) {  
  428.                         w >>= 1;
  429.                         h <<= 1;
  430.                         }
  431.                     width = w;
  432.                     height= h;
  433. #endif                    
  434.                     DIcon* ic= new DIcon( id, width, height, (const char*)bitmap, bytesize);
  435.                     this->InsertLast( ic);
  436.                     width= height= id= 0;
  437.                     bitmap= (byte*) Nlm_MemFree(bitmap);
  438.                     bitsp= NULL;
  439.                     bytesize= atsize= 0;
  440.                     inbits= instring= false;
  441.                     gotdata= true;
  442.                     *cp= 0; // done
  443.                     }
  444.                     
  445.                 }
  446.             } // end suckbits
  447.             
  448.                         
  449.         else if ( (linep= strchr(line,'{')) != NULL  && 
  450.              ( Nlm_StrngPos(line, "resource 'ICN#'", 0, true, &index)
  451.             || Nlm_StrngPos(line, "resource 'ics#'", 0, true, &index)
  452.             || Nlm_StrngPos(line, "resource 'ICON'", 0, true, &index) ) )
  453.             {
  454.             // !! get id value == first # after "("
  455.             char *nump= strchr(line,'(');
  456.             if (nump) {
  457.                 char *ep, ec;
  458.                 nump++;
  459.                 for (ep= nump; isdigit(*ep); ep++) ;
  460.                 ec= *ep; *ep= 0;
  461.                 id= atol(nump);
  462.                 *ep= ec;
  463.                 }
  464.             linep++;
  465.             inbits= true;
  466.             goto suckbits; 
  467.             }
  468.  
  469.         
  470.         }
  471.         
  472.     FileClose(f);
  473.     return gotdata;
  474. }
  475.  
  476.  
  477.  
  478. Boolean DIconList::ReadXbitmapFormat(char* filename) 
  479. {
  480. /******
  481. Xbitmap file format:
  482. #define  somename_width  16
  483. #define  somename_height 32
  484. #define  somename_bittype  x    #< optional addition to specify BitFormat
  485. static char somename [] = {            #< data starts after "{", ends after "}"
  486.    0x0f, 0xc0, 0x12, 0xff };    #< bitmap data as hex or decimal string of chars
  487. ******/
  488.     Boolean gotdata= false;
  489.     char line[512];
  490.     byte *bitsp= NULL, *bitmap = NULL;
  491.     Boolean inbits= false;
  492.     short    width = 0, height = 0;
  493.     long id = 0;
  494.     char* linep= line;
  495.     long     bytesize= 0;
  496.     long     atsize= 0;
  497.     short    bswap = 0;
  498.     BitFormat bitstype = macbits;
  499.  
  500.                 // set win system defaults -- override if file says to.
  501. #ifdef  WIN_MAC
  502.     bitstype = macbits;
  503. #endif
  504. #ifdef WIN_MSWIN
  505.     bitstype = msbits;
  506. #endif
  507. #ifdef WIN_MOTIF
  508.     bitstype = xbits;
  509. #endif
  510.  
  511.     FILE *f= FileOpen( filename, "r");
  512.     if (f) 
  513.      while (FileGets( line, 512, f)) {
  514.         // assume may be multiple bitmaps / file
  515.         linep= line;
  516.         
  517.         if (inbits) {
  518.     suckbits:            
  519.                   // data looks like: 0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00};
  520.             char* cp= linep;
  521.             if (!bitmap) {
  522.                 bytesize= height * ((width+7) / 8); // bytes/row + rowcount
  523.                 bitmap= (byte*) Nlm_MemGet( bytesize+1, false);
  524.                 bitsp= bitmap;
  525.                 }
  526.                 
  527.             while (*cp) {
  528.             
  529.                 if (*cp == '}' || *cp == ';') {
  530.                     // install data into new icon...
  531.                     *bitsp= 0; // 0 terminate? -- this isn't really useful, since bitmap can have nulls
  532.                     DIcon* ic= new DIcon( id, width, height, (const char*)bitmap, atsize);
  533.                     this->InsertLast( ic);
  534.                     width= height= id= 0;
  535.                     bitmap= (byte*) Nlm_MemFree(bitmap);
  536.                     bitsp= NULL;
  537.                     bswap= bytesize= atsize= 0;
  538.                     inbits= false;
  539.                     gotdata= true;
  540.                     *cp= 0; // done
  541.                     }
  542.                     
  543.                 else if (isdigit(*cp)) {
  544.                     short rslt= 0;
  545.                     unsigned short card= 0;
  546.                     char *fmt = "%hu";
  547.                     char ec, *ep = cp;
  548.                     Boolean okay= true;
  549.                     
  550.                     while (okay) {
  551.                         ep++;
  552.                         if (*ep == 'x' || *ep == 'X') fmt= "%hx";  
  553.                         else if (!*ep || !isalnum(*ep)) okay= false;
  554.                         }
  555.                     ec= *ep; *ep= 0;
  556.                     rslt= sscanf( cp, fmt, &card);
  557.                     *ep= ec;
  558.                     if ( atsize<bytesize && rslt>0 ) { 
  559.                         switch (bitstype) {
  560.                             case xbits: {
  561.                                 // X bitmaps have WEIRD storage format !! see Nlm_CopyBits
  562.                                 byte drac, i;
  563.                                 for (i=0, drac= 0; i<8; i++) { drac <<= 1; drac += card & 1; card >>= 1; }
  564.                                 *bitsp++ = (byte) drac;
  565.                                 }break;
  566.                             case msbits: {
  567.                                 *bitsp++ = ~(byte) card; // mswin is NOT
  568.                                 }break;
  569.                             case macbits: {
  570.                                 *bitsp++ = (byte) card;
  571.                                 }break;
  572.                             }
  573.                         atsize++;
  574.                         }
  575.                     cp = ep;
  576.                     }
  577.                     
  578.                 //else if (*cp == ',') cp++;
  579.                 else cp++; // spaces, all else...
  580.                 }
  581.             }
  582.             
  583.         else if (width && height && (linep= strchr(line,'{')) != NULL) {
  584.             linep++;
  585.             inbits= true;
  586.             goto suckbits; 
  587.             }
  588.             
  589.         else {
  590.             //look for string w/ "#define somename_width 16" << "width" is key
  591.             //or "#define somename_height 16" << "height" is key
  592.             StrPosInt index = 0;
  593.             char* cp;
  594.             if (Nlm_StrngPos(line, "width", 0, false, &index)) { //false==case-insensitive
  595.                 cp= line + index + 5; //length(width)
  596.                 while (*cp && !isdigit(*cp)) cp++;
  597.                 width= atol(cp); //?? what is better than atol()    
  598.                 }                 
  599.             else if (Nlm_StrngPos(line, "height", 0, false, &index)) {
  600.                 cp= line + index + 5;  
  601.                 while (*cp && !isdigit(*cp)) cp++;
  602.                 height= atol(cp); //?? what is better than atol()    
  603.                 }                 
  604.             else if (Nlm_StrngPos(line, "ident", 0, false, &index)) { 
  605.                 cp= line + index + 5; 
  606.                 while (*cp & !isdigit(*cp)) cp++;
  607.                 id= atol(cp);
  608.                 }                 
  609.             else if (Nlm_StrngPos(line, "bitstype", 0, false, &index)) { 
  610.                 cp= line + index + 8; 
  611.                 index= 0;
  612.                 if (Nlm_StrngPos(cp, "mac", 0, false, &index)) bitstype= macbits; 
  613.                 else if (Nlm_StrngPos(cp, "x", 0, false, &index)) bitstype= xbits; 
  614.                 else if (Nlm_StrngPos(cp, "ms", 0, false, &index)) bitstype= msbits; 
  615.                 }                 
  616.             }
  617.         
  618.         }
  619.         
  620.     FileClose(f);
  621.     return gotdata;
  622. }
  623.         
  624.  
  625.  
  626. #if 0
  627.  
  628.  
  629. // Xlibrary standard bitmap form:
  630. // (width+7) div 8 = # bytes/row
  631. #define left_ptr_width 16
  632. #define left_ptr_height 16
  633. #define left_ptr_x_hot 3
  634. #define left_ptr_y_hot 1
  635. static char left_ptr_bits[] = {
  636.    0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x38, 0x00, 0x78, 0x00, 0xf8, 0x00,
  637.    0xf8, 0x01, 0xf8, 0x03, 0xf8, 0x07, 0xf8, 0x00, 0xd8, 0x00, 0x88, 0x01,
  638.    0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00};
  639.  
  640.   
  641. #endif
  642.